.\"                                      Hey, EMACS: -*- nroff -*-
.TH RULEXDB_REMOVE_RULE 3 "February 19, 2012"
.SH NAME
rulexdb_remove_rule \- remove specified rule from the rulex database
.SH SYNOPSIS
.nf
.B #include <rulexdb.h>
.sp
.BI "int rulexdb_remove_rule(RULEXDB *" rulexdb ", int " rule_type \
", int " position );
.fi
.SH DESCRIPTION
The
.BR rulexdb_remove_rule ()
function removes a rule identified by its type and position in the
ruleset from the rulex database
referenced by
.I rulexdb
argument.
.PP
The argument
.I rule_type
specifies the rule type. It may accept one of the following values:
.TP
.B RULEXDB_LEXCLASS
The rule is the word classifier and belongs to the \fBClassifiers\fP
dataset.
.TP
.B RULEXDB_PREFIX
The requested rule should be removed from the \fBPrefix detectors\fP
ruleset.
.TP
.B RULEXDB_RULE
The requested rule should be removed from the \fBGeneral\fP rules
dataset.
.TP
.B RULEXDB_CORRECTOR
The rule is a correction rule that belongs to the \fBCorrectors\fP
dataset.
.PP
The argument
.I position
defines position of the requested rule in the ruleset.
.SH "RETURN VALUE"
The
.BR rulexdb_remove_rule ()
function returns
.B RULEXDB_SUCCESS
which is zero when specified rule was successfully removed, positive
value
.B RULEXDB_SPECIAL
when there is no rule with such number in specified ruleset, or
negative error code otherwise.
.SH ERRORS
.TP
.B RULEXDB_FAILURE
Referenced database has not been opened, internal data structures are
corrupted or some other general failure has occurred.
.TP
.B RULEXDB_EPARM
The argument
.I rulexdb
or
.I rule_type
has an invalid value.
.TP
.B RULEXDB_EACCESS
The database is not opened for updating.
.SH SEE ALSO
.BR rulexdb_classify (3),
.BR rulexdb_close (3),
.BR rulexdb_dataset_name (3),
.BR rulexdb_discard_dictionary (3),
.BR rulexdb_discard_ruleset (3),
.BR rulexdb_fetch_rule (3),
.BR rulexdb_lexbase (3),
.BR rulexdb_load_ruleset (3),
.BR rulexdb_open (3),
.BR rulexdb_remove_item (3),
.BR rulexdb_remove_this_item (3),
.BR rulexdb_retrieve_item (3),
.BR rulexdb_search (3),
.BR rulexdb_seq (3),
.BR rulexdb_subscribe_item (3),
.BR rulexdb_subscribe_rule (3)
.SH AUTHOR
Igor B. Poretsky <poretsky@mlbox.ru>.
